<?php
	/* Functions in this file */
	/**************************/

	// GetChordName()
	// GetChordNamePtr()
	// GetMFCClassName()
	// GetMFCClassSchema()
	// GetPosition()
	// IsValidPosition($position)
	// SetChordName(&$chordName)
	// SetPosition($position)
?>
<?php
	 
	 
	class ChordText {
		 
		 
		// Default Constants
		const DEFAULT_POSITION = 0;
		 
		 
		protected $m_position = self::DEFAULT_POSITION;
		protected $m_chordName;
		 
		 
		// MFC Class Functions
		 
		 
		function GetMFCClassName() {
			return "CChordText";
		}
		 
		 
		function GetMFCClassSchema() {
			return 1;
		}
		 
		// Position Functions
		 
		 
		 
		function IsValidPosition($position) {
			return (($position >= 0) && ($position <= 255));
		}
		 
		 
		 
		function SetPosition($position) {
			if (!$this->IsValidPosition($position)) return 0;
			$this->m_position = $position;
			 return 1;
		}
		 
		 
		function GetPosition() {
			return ($this->m_position);
		}
		 
		// Chord $this->Name Functions
		 
		function SetChordName(&$chordName) {
			$this->m_chordName = $chordName;
		}
		 
		 
		function GetChordName() {
			return ($this->m_chordName);
		}
		 
		 
		function & GetChordNameRef() {
			return ($this->m_chordName);
		}
		 
		 
		static function & GetChordNameConstRef() {
			return ($this->m_chordName);
		}
		 
		 
		//function GetChordNamePtr(){
		//return (&$this->m_chordName);
		//}
		 
		 
		// Constructor/Destructor
		 
		function ChordText($position = NULL, &$chordName = NULL) {
			 
			$this->m_chordName = new ChordName ();
			if (!$this->IsValidPosition($position)) return 0;
			
		}
		 
		
		// Serialization Functions
		 
		function DoSerialize(&$stream){
		 
			WRITE_BYTE ($stream,$this->m_position);
			
			$this->m_chordName->DoSerialize($stream);

			return 1;
		}
		
		 
		function DoDeserialize(&$stream){
		 
		
			$this->m_position = READ_BYTE ($stream);
			
			$this->m_chordName = new ChordName ();
			$this->m_chordName->DoDeserialize($stream);
		
		}
		
		 
	}
	 
?>

